﻿using Avalonia;

namespace torch.plugin;

using Avalonia.Controls;

/// <summary>
/// 插件接口定义
/// </summary>
public interface IPlugin
{
    /// <summary>
    /// 插件唯一标识，大写带减号-的UUID
    /// </summary>
    string Id { get; }

    /// <summary>
    /// 插件名称
    /// </summary>
    string Name { get; }

    /// <summary>
    /// 插件描述
    /// </summary>
    string Description { get; }
    
    /// <summary>
    /// 建议承载此插件的窗口大小
    /// </summary>
    Size Size { get; }

    /// <summary>
    /// 插件版本
    /// </summary>
    Version Version { get; }

    /// <summary>
    /// 获取插件UI
    /// </summary>
    Control GetUserInterface();

    /// <summary>
    /// 初始化插件
    /// </summary>
    Task InitializeAsync();

    /// <summary>
    /// 释放插件资源
    /// </summary>
    void Dispose();
}